package com.study.ui

import android.util.Log
import com.study.base.BaseActivity
import com.study.ui.anim.ActivityAnimActivity
import com.study.ui.compose.ComposeActivity
import com.study.ui.other.BlurActivity
import kotlinx.android.synthetic.main.activity_ui_main.*
import org.jetbrains.anko.sdk27.coroutines.onClick
import org.jetbrains.anko.startActivity

/**
 * <pre>
 *     author : fauks
 *     time   : 2020/03/28
 *     desc   :
 * </pre>
 */
class UIMainActivity : BaseActivity() {
    override fun generateLayoutId(): Int {
        return R.layout.activity_ui_main
    }

    override fun initView() {
        super.initView()
        Log.i("fauks", "A onCreate")
        activityAnimBtn.onClick {
            startActivity<ActivityAnimActivity>()
        }
        composeBtn.onClick {
            startActivity<ComposeActivity>()
        }

        blurBtn.onClick {
            startActivity<BlurActivity>()
        }
    }

    override fun onStart() {
        super.onStart()
        Log.i("fauks", "A onStart")
    }

    override fun onRestart() {
        super.onRestart()
        Log.i("fauks", "A onRestart")
    }

    override fun onResume() {
        super.onResume()
        Log.i("fauks", "A onResume")
    }

    override fun onPause() {
        super.onPause()
        Log.i("fauks", "A onPause")
    }

    override fun onStop() {
        super.onStop()
        Log.i("fauks", "A onStop")
    }
}